/**
 * 
 */
package nl.boektrust.btsoep.shared.model;

import java.io.Serializable;
import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * @author rao3
 *
 */
public class URLReference implements Serializable,IsSerializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7227912694162753699L;
	private String url;
	private URLReferenceType urlReferenceType;
	/**
	 * @param url
	 * @param urlReferenceType
	 */
	public URLReference(String url, URLReferenceType urlReferenceType) {
		super();
		this.url = url;
		this.urlReferenceType = urlReferenceType;
	}
	public URLReference() {
		this("",URLReferenceType.UNDEFINED);
	}
	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}
	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	/**
	 * @return the urlReferenceType
	 */
	public URLReferenceType getUrlReferenceType() {
		return urlReferenceType;
	}
	/**
	 * @param urlReferenceType the urlReferenceType to set
	 */
	public void setUrlReferenceType(URLReferenceType urlReferenceType) {
		this.urlReferenceType = urlReferenceType;
	}
	
	public String print() {
		String string;
		if (url != null) {
			string = new String("URLReference(): urlReferenceType: "+URLReferenceType.stringValue(urlReferenceType)+" url: "+url);
		} else {
			string = new String("URLReference(): urlReferenceType: "+URLReferenceType.stringValue(urlReferenceType)+" isbn13: NULL");

		}
		return string;
	}
}


